home *** CD-ROM | disk | FTP | other *** search
- property sp, cst, rct, state
-
- on new me, asp
- me.sp = asp
- me.cst = member(the member of sprite me.sp).name
- temp = item 1 of the cst of me
- SwapCast(me, temp & ",norm")
- me.rct = the rect of sprite me.sp
- me.state = #default
- return me
- end
-
- on CheckState me
- case me.state of
- #default:
- CheckOver(me)
- #normal:
- DoNormal(me)
- #over:
- DoOver(me)
- end case
- end
-
- on CheckOver me
- if inside(the mouseLoc, me.rct) then
- temp = item 1 of the cst of me
- SwapCast(me, temp & ",over")
- me.state = #over
- end if
- end
-
- on DoNormal me
- temp = item 1 of the cst of me
- SwapCast(me, temp & ",norm")
- me.state = #default
- end
-
- on DoOver me
- if inside(the mouseLoc, me.rct) then
- else
- me.state = #normal
- end if
- end
-
- on SwapCast me, aMem
- me.cst = aMem
- set the member of sprite the sp of me to me.cst
- end
-